<template>
	<view class="eventInfo">
		<!-- 事件详情 -->
		<TertiaryTitle :dataObj="dataObj"   @goBack="goBack"></TertiaryTitle>
		
		<view class="bgc"></view>
		
		<view class="content">
			<view class="info">
				<view class="info-item" @click="getLookDispatchSheet">
					<view class="name">查看资源调度</view>
					<u-icon name="arrow-right" color="#A7AEBD" size="22"></u-icon>
				</view>
				<view class="info-item" @click="lookDisposalRecords">
					<view class="name">查看处置记录</view>
					<u-icon name="arrow-right" color="#A7AEBD" size="22"></u-icon>
				</view>
				<view class="info-item" @click="lookVideoPlayback">
					<view class="name">查看视频回放</view>
					<u-icon name="arrow-right" color="#A7AEBD" size="22"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import TertiaryTitle from "@/subpackage-emergency/pages/components/tertiaryTitle.vue"
	export default {
		name: "eventInfo",
		components: {
			TertiaryTitle
		},
		data() {
			return {
				dataObj: {
					bizProjectName: "",
					sectionName: "",
					siteName: "",
					startTime2: ""
				},
				data: {},  
			}
		},
		onLoad(option) {
			const eventChannel = this.getOpenerEventChannel();
			eventChannel.on('setData', (data) => {
				console.log("setDatasetDatasetData", data.data)
				this.data = data.data
				this.dataObj.bizProjectName = this.data.bizProjectName
				this.dataObj.sectionName = this.data.sectionName
				this.dataObj.siteName = this.data.siteName
				this.dataObj.startTime2 = this.data.startTime2
			})
		},
		methods: {
			// 查看资源调度
			getLookDispatchSheet(){
				uni.navigateTo({
					url:`/subpackage-emergency/pages/lookDispatchSheet?eventId=${this.data.id}`
				})
			},
			
			// 查看处置记录
			lookDisposalRecords() {
				uni.navigateTo({
					url: `/subpackage-emergency/pages/disposalRecords?id=` + this.data.id,
				})
				
			},
			
			// 查看视频回放
			lookVideoPlayback() {
				uni.navigateTo({
					url: `/subpackage-emergency/pages/liveVideo?videoType=1&id=` + this.data.id,
				})
				
			},
			
			goBack(url){
				uni.navigateBack({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.eventInfo{
		width: 100%;
		height: 100%;
		.bgc{
			width: 100%;
			height: 30rpx;
			background-color: #F5F7FA;
		}
		.info{
			padding: 0rpx 32rpx;
			.info-item{
				display: flex;
				align-items: center;
				padding: 0rpx 38rpx;
				height: 100rpx;
				line-height: 100rpx;
				border-bottom: 2rpx solid #E2E5ED;
				cursor: pointer;
				.name{
					flex: 1;
					font-size: 32rpx;
					font-weight: 400;
					color: #445469;
					
				}
			}
		}
	}
</style>
<style>
	page{
		height: 100%;
		width: 100%;
	}
	body{
		width: 100%;
		height: 100%;
	}
</style>